package cn.nebula.core.user.dao;

import java.util.List;

import cn.nebula.core.base.dao.BaseDaoImpl;
import cn.nebula.core.user.model.User;

public class UserDaoImpl extends BaseDaoImpl implements UserDao {

	
	public User login(String loginname, String loginpwd) throws Exception {
		User rtn = null;
		String hql = "FROM User WHERE loginno='" + loginname + "' and loginpwd='"+loginpwd+"'";
		List<User> result = (List<User>) this.getDatas(hql).datas;
		if (!result.isEmpty()) {
			rtn =result.get(0);
		}
		return rtn;
	}
	
}
